<template>
  <div>
    <!-- routerLink的两种写法, RouterLink相当于a-->
    <RouterLink :to="{path: '/MyTest5'}" active-class="routeLink">点我</RouterLink>
<!--    <RouterLink to="/MyTest5" active-class="routeLink">点我</RouterLink>-->
    <RouterLink to="/MyTest4" active-class="routeLink">点我</RouterLink>
    <RouterLink to="/MyTest3" active-class="routeLink">点我</RouterLink>
    <RouterView></RouterView>
  </div>
</template>

<script lang="ts">
  /**
   * @Author Rin_pu
   * @Date 2025/2/18 16:56
   * @Description MyTest8
   * @todo
   */
  export default {
    name: "MyTest6"
  }
</script>

<script setup lang="ts">
  import {RouterView, RouterLink} from 'vue-router'
</script>

<style scoped>
  a {
    margin: 10px;
  }
  .routeLink {
    background-color: skyblue;
  }
</style>